class Calculator:
    def add(self, a, b):
        return a + b

    def subtract(self, a, b):
        return a - b

    def batch_subtract(self, a_list, b_list):
        result_list = []
        for i in range(len(a_list)):
            result_list.append(self.subtract(a_list[i], b_list[i]))
        return result_list
    def multiply(self, a, b):
        return a * b

    def divide(self, a, b):
        if b == 0:
            raise ValueError("Cannot divide by zero")
        else:
            return a / b


# 生成一个实例
c = Calculator()
print(c.add(2, 4))
print(c.subtract(2, 4))
print(c.multiply(2, 4))
print(c.divide(2, 4))
print(c.batch_subtract([8, 6, 4], [3, 2, 1]))
